import {
  uploadImg
} from '@/api/upload'

const upload = {
  state: {
  },

  mutations: {
  },

  actions: {
    // 上传图片
    uploadImg({ commit }, data) {
      return new Promise((resolve, reject) => {
        uploadImg(data).then(response => {
          resolve(response)
        }).catch(error => {
          reject(error)
        })
      })
    }
  }
}

export default upload
